package com.esri.core.renderer;

import com.esri.core.internal.util.d;
import com.github.mikephil.charting.utils.Utils;
import org.codehaus.jackson.JsonGenerator;

/* loaded from: classes.dex */
public abstract class StretchParameters {
    protected StretchType mType = StretchType.NONE;
    protected double mGamma = -1.0d;

    /* JADX INFO: Access modifiers changed from: package-private */
    public void a(JsonGenerator jsonGenerator) throws Exception {
        this.mType.a(jsonGenerator);
        d.a(jsonGenerator, "gamma", this.mGamma);
    }

    public void setGamma(double d) {
        this.mGamma = d;
    }

    public double getGamma() {
        return this.mGamma;
    }

    public StretchType getType() {
        return this.mType;
    }

    /* loaded from: classes.dex */
    public static final class MinMaxStretchParameters extends StretchParameters {
        public MinMaxStretchParameters() {
            this.mType = StretchType.MINIMUM_MAXIMUM;
        }
    }

    /* loaded from: classes.dex */
    public static final class StdDevStretchParameters extends StretchParameters {
        private double a = 2.0d;

        public StdDevStretchParameters() {
            this.mType = StretchType.STANDARD_DEVIATION;
        }

        @Override // com.esri.core.renderer.StretchParameters
        void a(JsonGenerator jsonGenerator) throws Exception {
            super.a(jsonGenerator);
            d.a(jsonGenerator, "stdDev", this.a);
        }

        public void setStdDev(double d) {
            this.a = d;
        }

        public double getStdDev() {
            return this.a;
        }
    }

    /* loaded from: classes.dex */
    public static final class HistogramStretchParamaeters extends StretchParameters {
        public HistogramStretchParamaeters() {
            this.mType = StretchType.HISTOGRAM_EQUALIZATION;
        }
    }

    /* loaded from: classes.dex */
    public static final class ClipStretchParameters extends StretchParameters {
        private double a = -1.0d;
        private double b = -1.0d;

        public ClipStretchParameters() {
            this.mType = StretchType.PERCENT_CLIP;
        }

        @Override // com.esri.core.renderer.StretchParameters
        void a(JsonGenerator jsonGenerator) throws Exception {
            super.a(jsonGenerator);
            double d = this.a;
            if (d > Utils.DOUBLE_EPSILON) {
                d.a(jsonGenerator, "minClip", d);
            }
            double d2 = this.b;
            if (d2 > Utils.DOUBLE_EPSILON) {
                d.a(jsonGenerator, "maxClip", d2);
            }
        }

        public void setMinClip(double d) {
            this.a = d;
        }

        public double getMinClip() {
            return this.a;
        }

        public void setMaxClip(double d) {
            this.b = d;
        }

        public double getMaxClip() {
            return this.b;
        }
    }

    /* loaded from: classes.dex */
    public enum StretchType {
        NONE(0),
        MINIMUM_MAXIMUM(1),
        STANDARD_DEVIATION(2),
        HISTOGRAM_EQUALIZATION(3),
        PERCENT_CLIP(4);
        
        private int a;

        StretchType(int i) {
            this.a = i;
        }

        void a(JsonGenerator jsonGenerator) throws Exception {
            d.a(jsonGenerator, "stretchType", this.a);
        }
    }
}
